  //保存企业信息
  function updateInfo(id){
     var qyxxForm = document.forms["qyzzInfoForm"];
     var url='${ctx}/yw-rq-qyzz-info!doUpdate.action'
     var qyxxForm=serializeForm(qyxxForm);
     var wait=waitWin();
     var qyxxForm=Ext.encode(qyxxForm);
     wait.show();
       Ext.Ajax.request({
       url: url,
       dataType:"json",
       params: qyxxForm,
       success:function(response){
        wait.hide();
         var result=response.responseText;
         if(result=="success"){
              Ext.Msg.alert("提示","操作成功",function(){
            	window.location.reload();
            });
         }else{
            Ext.Msg.alert("提示","操作失败");
              return;    
         }
       
    },failure: function() {
        Ext.Msg.alert('错误', '请求失败,请稍后重试'); 
         wait.hide();
     } 
    
    });
        
  	}


function faultHandler(){
    alert("数据加载错误!");
}  

function waitWin(){
    var wait = new Ext.LoadMask(Ext.getBody(), {msg:"请稍后..."}); 
    return wait;
}


function serializeForm(form) {  
    var fElements = form.elements  
            || (document.forms[form] || Ext.getDom(form)).elements, hasSubmit = false, encoder = encodeURIComponent, element, options, name, val, data = {}, type;  
    Ext.each(fElements, function(element) {  
        name = element.name;  
        type = element.type;  
        if (!element.disabled && name) {  
            if (/select-(one|multiple)/i.test(type)) {  
                Ext.each(element.options, function(opt) {  
                            if (opt.selected) {
                                data[encoder(name)] = encoder((opt.hasAttribute  
                                        ? opt.hasAttribute('value')  
                                        : opt.getAttribute('value') !== "")  
                                        ? opt.value  
                                        : opt.text);  
                            }  
                        });  
            } else if (!/file|undefined|reset|button/i.test(type)) {
           
                if (!(/radio|checkbox/i.test(type) && !element.checked)  
                        && !(type == 'submit' && hasSubmit)) {  
                        if(element.value!=""){
                          data[encoder(name)] = encoder(element.value);  
                          hasSubmit = /submit/i.test(type);  
                    }
                }  
            }  
        }  
    });  
    return data;  
} 



